package com.feib.stms.action;



import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;


import com.feib.stms.model.UploadFile;
import com.feib.stms.model.UploadFileActionLog;
import com.feib.stms.model.UploadFileTodoList;







/**
 * 申購款資料審查
 * @author Jeff Gu
 *
 */
public class Stms3002ActionBean extends BaseDoUploadFileActionbean{
	
	
	
	private static final long serialVersionUID = -6042400424532125885L;
	
	/**
	 * 預設頁面,審查頁面直接顯示待審查資料
	 */
	private static final String DEFAULT_JSP = "/WEB-INF/views/stms3002/stms3002.jsp";
	
	

	
	public Stms3002ActionBean() {
		super();
		super.fileFormats = new ArrayList<String>();
		super.fileFormats.add(getUploadFileFormat());
		super.fileStatus=getFileStatus();
		super.todoListMenuItemPk=getTodoListMenuItemPk();
		super.deleteFileStatus=getDeleteStatus();


	}	
	
	
	@Override
	protected String getDefaultPage() {
		return DEFAULT_JSP;
	}
	
	@Override
	public String getUploadFileFormat() {
		return UploadFile.UPLOAD_FILE_PURCHASE_PAYMENT;
	}
	
	@Override
	public List<Integer> getFileStatus(){
		List<Integer> fileStatus=new ArrayList<Integer>();
		fileStatus.add(0);//0: 已上傳/待驗資/待審查(已轉入，尚未有任何人審查)
		fileStatus.add(10);//10: 審查中(已有人員審查，但未達到審查人數門檻)		
		return fileStatus;
		
	}

	


	@Override
	public String getDownloadFileName() {
		return "申購明細表_"+yyyyMMddHHmmSS.format(Calendar.getInstance().getTime())+".xls";
	}




	@Override
	public Long getTodoListMenuItemPk() {
		
		return UploadFileTodoList.TODO_CONFIRM_PURCHASE_PAYMENT;
	}


	@Override
	public List<String> getActions() {
		List<String> actions=new ArrayList<String>();		
		actions.add(UploadFileActionLog.UPLOAD_FILE_ACTION_LOG_CHECK);		
		return actions;
	}


	@Override
	public Integer getDeleteStatus() {
		/* 20: 已刪除/審查不通過(只要有一人審查不通過，即為審查不通過；明細應註記為刪除) */
		return 20;
	}

	
	
	



}
